[Step 10][SourceTree] Save unfinished changes with stash - Yellow-Team-Millerslab/GitPlayground GitHub Wiki
Equivalent in HG: Shelve
Use Case: Temporarily shelves (or stashes) changes you've made to your working copy so you can work on something else, and then come back and re-apply them later on. ref
Note: This feature is still backlogging in VS2017
Currently, we have 2 branches under test. Checkout
one of them.
-
Edit
readme.md
and in SourceTree, clickStash
on top -
It will pop up a modal. Enter the message you like and click ok.
-
Now your
File Status
should show no file changes, and there is one record inSTASHES
on left -
(optional) Switch to the other branch and make a commit and switch back.
-
Right-click on the stash record in
STASHES
and clickApply Stash...
-
Check
File Status
, readme.md file should have the same change you made before.
The whole process:
Relate commands:
- git stash
- git stash -u
- git stash save
- git stash save -u
- git stash list
- git stash pop
- git stash apply
- git stash pop "stash@{id}"
- git stash apply "stash@{id}"
- git stash drop "stash@{id}"
- git stash clear